<?php

namespace app\admin\model;



use think\Model;
                    



class Invoices extends Model
                    

{
                    

    public function getAll($where){
                    

        $rs = Invoices::where($where)
                    

        ->select();
                    

        return $rs;
                    

    }
                    

    public function getOne($where){
                    

        $rs = Invoices::where($where)
                    

        ->find();
                    

        return $rs;
                    

    }
                    

    public function add($data){
                    

        $rs = Invoices::data($data)
                    

        ->save();
                    

        return $rs;
                    

    }
                    

    public function edit($where,$data){
                    

        $rs = Invoices::where($where)
                    

        ->update($data);
                    

        return $rs;
                    

    }
                    

    public function del($where){
                    

        $rs = Invoices::where($where)
                    

        ->delete();
                    

        return $rs;
                    

    }
                    

}
                    

